//
//  UIView+IBInspectable.swift
//  SYWeibo
//
//  Created by Saya on 16/4/7.
//  Copyright © 2016年 黄金果. All rights reserved.
//

import UIKit

extension UIView {
    @IBInspectable var cornerRadius :CGFloat {
        get {
            return layer.cornerRadius
        }
        
        set{
            layer.masksToBounds = true
            layer.cornerRadius = newValue
        }
    }
    
    @IBInspectable var borderColor: UIColor {
        get{
            if let c = layer.borderColor{
                return UIColor(CGColor: c)
            }else{
                return UIColor.clearColor()
            }
        }
        
        set{
            layer.borderColor = newValue.CGColor
        }
    }
    


}
